﻿using System;
using System.Collections.Generic;

using System.Text;

namespace EmbeddedResources1
{
    public class ResourceKeyValueItem 
    {
        public string AssemblyName { get; set; }
        public string ResourceName { get; set; }
        public string Key { get; set; }
        public string Value { get; set; }
        public string TranslatedValue { get; set; }
        public Languages.LanguagesTypes Language{ get; set;}
        
        public string ExportToCSV()
        {
            string s = this.AssemblyName.Split(',')[0] + ";"
                     + this.ResourceName + ";"
                     + this.Key + ";"
                     + this.Value + ";"
                     + this.TranslatedValue + ";"
                     + Languages.GetLanguageCultureInfoString(this.Language) + "\r\n";
            return s;
        }


        public ResourceKeyValueItem Clone()
        {
            return new ResourceKeyValueItem() { AssemblyName = this.AssemblyName, Language = this.Language, 
                                                Key = this.Key, ResourceName = this.ResourceName, 
                                                TranslatedValue = this.TranslatedValue, Value = this.Value };
        }

    }
}
